import debounce from "@/tools/debounce"

function HeaderSearch({ setSearch }: {
    setSearch?: React.Dispatch<React.SetStateAction<string>>
}) {
    const debouncer = debounce(setSearch)

    return (
        <>
            <div
                className="w-[701px] h-[59.2px] m-auto mt-[13px] mb-[13.2px]"
                style={{
                    border: '1px solid #ddd',
                    borderRadius: '100px'
                }}
            >
                <input
                    type="text"
                    placeholder="请输入会员昵称/手机号"
                    onChange={(e) => {
                        debouncer(e.target.value)
                    }}
                    className="text-[24px]
                        ml-[57px]
                        outline-none
                        w-[348px]
                        h-[33px]"
                    style={{ color: '#BBBBBB' }}
                />
            </div>
        </>
    )
}
export default HeaderSearch